package com.colin.library.base;

import android.app.Activity;
import android.os.Bundle;

import com.colin.library.listener.IAlertCallBack;
import com.colin.library.listener.IAlertListCallBack;
import com.colin.library.listener.IAlertMultipleListCallBack;

/**
 * Created by Colin on 2016/12/29.
 */

public interface BaseView {
    int ALERT_LOADING = 0x00000000;//网络加载
    int ALERT_PROMPT = 0x00000001;//提示
    int ALERT_EDIT = 0x00000002;//编辑的alert
    int ALERT_LIST = 0x00000003;//list

    //初始化presenter
    void initPresenter();

    //初始化布局
    int initViewLayoutID();

    //初始化控件
    void initView();

    //初始化数据
    void initData();

    //初始化监听
    void initListener();

    //初始化异步任务
    void initAsync();


    //隐藏输入键盘
    void hideKeyword();


    void setTitle(String title);

    //当前界面正在网络请求
    boolean isLoading();

    //开始异步任务 是否开启提示框界面
    void httpStart(boolean is_show_loading);

    //结束异步任务
    void httpEnd(boolean is_show_loading);

    void toastShow(int string_id);

    void toastShow(String msg);

    boolean isAlertShowing();

    boolean isAlertShowing(int alert_what);

    //普通提示框
    void alertShow(String message);

    void alertShow(String title, String message);

    void alertShow(int alert_what, String message);

    void alertShow(int alert_what, String title, String message, IAlertCallBack iAlertCallBack);

    //文本编辑提示框
    void alertEdit(String title, String message, IAlertCallBack iAlertCallBack);

    //文本编辑提示框
    void alertEdit(String title, String message, int inPutType, IAlertCallBack iAlertCallBack);

    void alertList(String[] array, IAlertListCallBack iAlertListCallBack);

    void alertList(String title, int position, final String[] array, IAlertListCallBack callBack);

    void alertMultiList(String[] array, IAlertMultipleListCallBack callBack);

    void alertMultipleList(String title, boolean[] positionArray, final String[] array, IAlertMultipleListCallBack callBack);

    void closeAlert();

    void closeAlert(int alert_what);

    // 界面跳转
    void startActivity(String target, Bundle bundle, boolean closeSelf);

    void startActivity(Class<? extends Activity> target, Bundle bundle, boolean closeSelf);

    void startActivityForResult(Class<? extends Activity> target, int requestCode, Bundle bundle);

    void closeActivity();


}
